<!--#include file="Config.asp" -->
<!--#include file="HeadTop.asp"-->


<%
set RS=server.createobject("adodb.recordset")

strdate=Trim(Request("currentDate"))
If strdate="" Then
strdate=Date()
Else
strdate=strdate
End If

calendarFinType=trim(request("calendarFinType"))
calendarFlag=trim(request("calendarFlag"))

%>


<!-- 时间管理 /////////////// -->
<TABLE class="table table-condensed">
<TR>
<FORM METHOD=POST ACTION="?">
<td colspan=9  bgcolor='#CCFF99'>
<SELECT NAME="calendarFinType">
<%if calendarFinType<>"" then%>
<OPTION VALUE="<%=int(calendarFinType)%>" selected ><%=10*calendarFinType%>%</option>
<%end if%>
<OPTION VALUE="" >=选择全部=</option>
<%For Fi=0 To 10%>
<OPTION VALUE="<%=Fi%>" ><%=10*Fi%>%</option>
<%next%>
</SELECT>
<SELECT NAME="calendarFlag">
<%if calendarFlag<>"" then%>
<OPTION VALUE="<%=int(calendarFlag)%>" selected><%=calendarFlag%>.<%=ShowFlagname(Trim(calendarFlag))%></option>
<%end if%>
<OPTION VALUE="" >=选择全部=</option>
<%
SQL="select * from Plan_flag where userid="&session("AnyPIM_userID")&" order by ID"
rs.open sql,conn,1,1
For s=1 To rs.recordcount
%>
<OPTION VALUE="<%=Int(rs("id"))%>"><%=Int(rs("id"))%>.<%=trim(rs("title"))%></OPTION>
<%
rs.moveNext
next
rs.close
%>
</select>
<SELECT NAME="sort">
<%
SQL="select * from Plan_sort where userid="&session("AnyPIM_userID")&" order by ID"
rs.open sql,conn,1,1
For s=1 To rs.recordcount
%>
<OPTION VALUE="<%=rs("id")%>"><%=trim(rs("name"))%></OPTION>
<%
rs.moveNext
next
rs.close
%>
</SELECT>
<SELECT NAME="calendarRight">
	<OPTION VALUE="2" SELECTED>公开</option>
	<OPTION VALUE="1">私人</option>
</SELECT>
<INPUT TYPE="text" NAME="" size='10'>
<INPUT TYPE="text" NAME="" size='10'>
<INPUT TYPE="submit" value='列表'>
</td>
</FORM>
</TR>

<TR>
	<TD bgcolor='#ddeeff'>事项列表</TD>
	<TD bgcolor='#ddeeff'>时间</TD>
	<TD bgcolor='#ddeeff'>完成?</TD>
	<TD bgcolor='#ddeeff'>优先级</TD>
	<TD bgcolor='#ddeeff'>目标</TD>
	<TD bgcolor='#ddeeff'>管理</TD>

</TR>
<%


SQL="select * from Plan_calendar,Plan_Target where Plan_calendar.calendarMplan=Plan_Target.T_ID and Plan_calendar.userid="&session("AnyPIM_userID")&""

if not (calendarFinType="" or isempty(calendarFinType) ) then
	sql=sql&" and Plan_calendar.calendarFinType="+calendarFinType+" "
end if

if not (calendarFlag="" or isempty(calendarFlag) ) then
	sql=sql&" and Plan_calendar.calendarFlag="+calendarFlag+" "
end if

Desc="Plan_calendar.calendarFinType"
sql=sql&" order by "+Desc+" "
rs.open sql,conn,1,1
If rs.recordcount<>0 then
   rs.PageSize = 25
   Page = CLng(Request("Page"))
   If Page < 1 Then Page = 1
   If Page > rs.PageCount Then Page = rs.PageCount
   PageBegin=rs.PageSize*(Page-1)+1
  if rs.PageSize*PageN< rs.RecordCount then
    PageEnd=rs.PageSize * Page
  else
    PageEnd=rs.RecordCount
  end If
  maxpage=rs.pagecount
  rcount=rs.RecordCount
rs.AbsolutePage = Page
For iPage = 1 To rs.PageSize
%>
<TR style="cursor:hand" <%if (iPage mod 2)=0 then %>bgcolor='#f6f6f6'<%end if %>>
<TD title='<%=RS("calendartext")%>'>
<IMG src="img/icon_02.gif" WIDTH="14" HEIGHT="14" BORDER="0" ALT=""><%=RS("calendartitle")%>
</TD>
<TD><%=RS("calendarDate")%></TD>
<TD><%=RS("calendarFinType")*10%>%</TD>
<TD bgcolor='<%=ShowFlagColor(Trim(RS("calendarFlag")))%>'><%=Trim(RS("calendarFlag"))%>.<%=ShowFlagname(Trim(RS("calendarFlag")))%></TD>
<TD><A HREF="ObjectiveView.asp?ID=<%=int(rs("T_id"))%>" title='<%=rs("T_content")%>进度状况'> <%=rs("T_Title")%>&nbsp;<B>=进度=</B></A></TD>
<TD>
<A href="EventEdit.asp?ID=<%=int(RS("id"))%>"><B>修改|完成</B></A>
</TD>
</TR>
<%
rs.MoveNext
If rs.EOF Then Exit For
Next
Else
%>
	<tr>
		<td colspan='20'><a href="EventAdd.asp">暂无记录，请添加</a></td>
	</tr>
<%
End if
rs.close
%>
<tr><td align='right' colspan='9' bgcolor='#ddeeff'>

<%
  response.write "" & rcount & "/" & maxpage & ",当前显示<font color=red>第" & Page & "页</font>[<font color=red>第" & PageBegin & "条-第" & PageEnd & "条</font>]"%>
<%=Page%>/<%=maxpage%>
<%If Page <> 1 Then ' 如果不是位于第一页 %>
     <A HREF='?Page=1&calendarFinType=<%=calendarFinType%>&calendarFlag=<%=calendarFlag%>'>[首页]</A>
     <A HREF='?Page=<%=(Page-1)%>&calendarFinType=<%=calendarFinType%>&calendarFlag=<%=calendarFlag%>'>[上页]</A>
<%End If
  If Page <> maxpage Then ' 如果不是位于最后一页
%>
  <A HREF='?Page=<%=(Page+1)%>&calendarFinType=<%=calendarFinType%>&calendarFlag=<%=calendarFlag%>'>[下页]</A>
  <A HREF='?Page=<%=maxpage%>&calendarFinType=<%=calendarFinType%>&calendarFlag=<%=calendarFlag%>'>[末页]</A>
<%End If%>
</FONT>
</td>
</tr>
</TABLE>
</TD>
</TR>
</TABLE>

<!-- #include file="foot.asp" -->
